package com.canbot.u05.activity.vipguide;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.canbot.u05.R;
import com.canbot.u05.activity.BaseActivityNoTitle;
import com.canbot.u05.socket.MsgSendUtils;
import com.canbot.u05.socket.MsgType;
import com.canbot.u05.utils.PathConst;


/**
 *贵宾任务（单个）
* */
public class VipGuideTaskActivity extends BaseActivityNoTitle implements View.OnClickListener {


        @Override
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.activity_vip_guide_task);

                String[] voices = {"u05_rwbj_001.wav", "u05_rwbj_002.wav"};
                int index = (int) (Math.random() * voices.length);
                MsgSendUtils.sendStringMsg(MsgType.PLAY_SOUND, PathConst.VIP_GUIDE_DIR + voices[index]);

                setViews();

        }

        private void setViews() {
                findViewById(R.id.imageView_back).setOnClickListener(this);
                findViewById(R.id.rl_konw_vip).setOnClickListener(this);
                findViewById(R.id.rl_welcome_setting).setOnClickListener(this);
                findViewById(R.id.rl_site_setting).setOnClickListener(this);
                findViewById(R.id.rl_reception_setting).setOnClickListener(this);
        }

        @Override
        protected void onResume() {
                super.onResume();
        }

        @Override
        public void onClick(View view) {
                switch (view.getId()) {
                        case R.id.imageView_back:
                                finish();
                                break;
                        case R.id.rl_konw_vip:
                                startActivity(new Intent(VipGuideTaskActivity.this, SetVipNameActivity.class)
                                        .putExtra("name", getIntent().getStringExtra("name"))
                                        .putExtra("path", getIntent().getStringExtra("path"))
                                        .putExtra("identification", getIntent().getStringExtra("identification")));
                                break;
                        case R.id.rl_welcome_setting:
                                startActivity(new Intent(VipGuideTaskActivity.this, WelcomeSettingActivity.class)
                                        .putExtra("voicetype",getIntent().getIntExtra("voicetype",0))
                                        .putExtra("content", getIntent().getStringExtra("content"))
                                        .putExtra("identification", getIntent().getStringExtra("identification")));
                                break;
                        case R.id.rl_site_setting:
                                startActivity(new Intent(VipGuideTaskActivity.this, SiteSettingActivity.class)
                                        .putExtra("mapRoute", getIntent().getStringExtra("mapRoute"))
                                        .putExtra("identification", getIntent().getStringExtra("identification")));
                                break;
                        case R.id.rl_reception_setting:
                                startActivity(new Intent(VipGuideTaskActivity.this, ReceptionSettingActivity.class)
                                        .putExtra("identification", getIntent().getStringExtra("identification"))
                                        .putExtra("receptionaction", getIntent().getStringExtra("receptionaction")));
                                break;
                        default:
                                break;
                }
        }

}
